import http from '@/utils/http'

const BASE_URL = process.env.VUE_APP_API_BASE_URL;

export default {
	fetchBundle : params => {
		const url = `${BASE_URL}/modules/web/gift/getGiftList`;
        return http.post(url, params);
	},
	handleDelete: params => {
		const url = `${BASE_URL}/modules/web/gift/giftDelete/`+params;
        return http.get(url);
	},
	getDetail: params => {
		const url = `${BASE_URL}/modules/web/gift/getGiftDetail/`+params;
        return http.get(url);
	},
	createBundle : params => {
		const url = `${BASE_URL}/modules/web/gift/createBundle`;
        return http.post(url, params);
	},
	updateBundle : params => {
		const url = `${BASE_URL}/modules/web/gift/updateBundle`;
        return http.post(url, params);
	},
	handlerCouponId: params => {
		const url = `${BASE_URL}/modules/web/gift/getCouponDetail/`+params;
        return http.get(url);
	},
	orderList : params => {
		const url = `${BASE_URL}/modules/web/bundle/order/list`;
        return http.post(url, params);
	},
	applyBack: params => {
		const url = `${BASE_URL}/modules/web/bundle/order/preRefund/`+params;
        return http.get(url);
	},
	orderBack: params => {
		const url = `${BASE_URL}/modules/web/bundle/order/realRefund/`+params;
        return http.get(url);
	},
	getOrderDetail: params => {
		const url = `${BASE_URL}/modules/web/bundle/order/detail/`+params;
        return http.get(url);
	},
}